/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entidade;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author linton
 */
@Entity
@Table(name = "cofre")
@NamedQueries({@NamedQuery(name = "Cofre.findAll", query = "SELECT c FROM Cofre c"), @NamedQuery(name = "Cofre.findByIdCofre", query = "SELECT c FROM Cofre c WHERE c.idCofre = :idCofre"), @NamedQuery(name = "Cofre.findByCaixaidCaixa", query = "SELECT c FROM Cofre c WHERE c.caixaidCaixa = :caixaidCaixa"), @NamedQuery(name = "Cofre.findBySaldoCheque", query = "SELECT c FROM Cofre c WHERE c.saldoCheque = :saldoCheque"), @NamedQuery(name = "Cofre.findBySaldoDinheiro", query = "SELECT c FROM Cofre c WHERE c.saldoDinheiro = :saldoDinheiro")})
public class Cofre implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idCofre")
    private Integer idCofre;
    @Basic(optional = false)
    @Column(name = "Caixa_idCaixa")
    private int caixaidCaixa;
    @Column(name = "SaldoCheque")
    private Integer saldoCheque;
    @Column(name = "SaldoDinheiro")
    private Integer saldoDinheiro;

    public Cofre() {
    }

    public Cofre(Integer idCofre) {
        this.idCofre = idCofre;
    }

    public Cofre(Integer idCofre, int caixaidCaixa) {
        this.idCofre = idCofre;
        this.caixaidCaixa = caixaidCaixa;
    }

    public Integer getIdCofre() {
        return idCofre;
    }

    public void setIdCofre(Integer idCofre) {
        this.idCofre = idCofre;
    }

    public int getCaixaidCaixa() {
        return caixaidCaixa;
    }

    public void setCaixaidCaixa(int caixaidCaixa) {
        this.caixaidCaixa = caixaidCaixa;
    }

    public Integer getSaldoCheque() {
        return saldoCheque;
    }

    public void setSaldoCheque(Integer saldoCheque) {
        this.saldoCheque = saldoCheque;
    }

    public Integer getSaldoDinheiro() {
        return saldoDinheiro;
    }

    public void setSaldoDinheiro(Integer saldoDinheiro) {
        this.saldoDinheiro = saldoDinheiro;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCofre != null ? idCofre.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cofre)) {
            return false;
        }
        Cofre other = (Cofre) object;
        if ((this.idCofre == null && other.idCofre != null) || (this.idCofre != null && !this.idCofre.equals(other.idCofre))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidade.Cofre[idCofre=" + idCofre + "]";
    }

}
